<?php $this->_extends('../_layouts/default_layout');?>
<?php $this->_block('contents');?>
<script type="text/javascript" src="<?=Q::ini('custom_system/base_url');?>js/validator.js"></script>
<script type="text/javascript">
$(function(){
	$(".select_url").mouseover(function(){$(this).select();});
	$(".message_picture").colorbox({width:"80%", height:"80%", iframe:true});
});
</script>
<fieldset><legend>查询条件</legend>
<form onSubmit="return Validator.Validate(this,3)">
<?include (Q::ini('custom_system/elements_dir') . 'searchform_element.php');?>
<table class="form_table">
<tr>
	<th>产品编号</th>
	<td><input type="text" name="product_number" value="<?=isset($_GET['product_number']) ? $_GET['product_number'] : '';?>" dataType="Require" msg="请填写sku" /><span class="red">*</span></td>
</tr>
<tr>
	<th>人名</th>
	<td><input type="text" name="name" value="<?=isset($_GET['name']) ? $_GET['name'] : '';?>"/></td>
</tr>
<tr>
	<th>图片大小</th>
	<td><input type="text" name="picture_size" value="<?=isset($_GET['picture_size']) ? $_GET['picture_size'] : '';?>"/></td>
</tr>
<tr>
	<th></th>
	<td><input type="submit" class="button" value="查询"/></td>
</tr>
</table>
</form>
</fieldset>
<?if (! empty($result)):?>
<table class="list_table" width="100%" id="list">
<tr>
	<th width="140">图片</th>	
	<th>url</th>
</tr>
<?foreach ($result as $k => $v):?>
<tr>
	<td>
	<?if(substr($v, -3) == 'mpg'):?>
	<img src="<?=Q::ini('custom_system/base_url')?>img/mpg.png" width="120"></img>
	<?elseif (substr($v, -3) == 'avi'):?>
	<img src="<?=Q::ini('custom_system/base_url')?>img/avi.png" width="120"></img>
	<?elseif(in_array(substr($v, -3), array('jpg', 'gif', 'png'))):?>
	<a class="message_picture" href="<?=$v?>">
		<img src="<?=$v?>" width="120"></img>
	</a>
	<?else:?>
	<img src="<?=Q::ini('custom_system/base_url')?>img/unknow.png" width="120"></img>
	<?endif;?>
	</td>
	<td><input class="select_url" size="80" value="<?=$v?>" /></td>
</tr>
<?endforeach;?>
</table>
<?endif;?>
<?php $this->_endblock();?>